package cn.geminis.auth.model;

import cn.geminis.lowcode.annotation.*;
import jakarta.persistence.Column;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

/**
 * @author puddi
 */
@Getter
@Setter
@UuidEntity
@DynamicInsert
@DynamicUpdate
@QueryFilter
@CrudRepository
@CrudController
public class RegisteredClient {

    @Column(nullable = false, length = 36)
    @QueryFilterProperty
    private String clientId;

    @Column(nullable = false, length = 256)
    private String clientSecret;

    @Column(nullable = false, length = 36)
    private String clientName;

    @Column(nullable = false, length = 256)
    private String authorizationGrantTypes;

    @Column(nullable = false, length = 256)
    private String redirectUris;

    @Column(nullable = false)
    private String postLogoutRedirectUris;

    @Column(nullable = false)
    private long accessTokenTime;

    @Column(nullable = false, length = 256)
    private String scopes;

}
